/*
 * if_ether.c
 *
 *  Created on: Jun 23, 2010
 *      Author: fify
 */

#include <string.h>
#include <netinet/in.h>

#include "if_ether.h"

void build_eth_hdr(struct ethhdr *eth, struct mac_addr *dest,
		struct mac_addr *src, __be16 protocol)
{
	memcpy(eth->h_dest, (char *)dest, ETH_ALEN);
	memcpy(eth->h_source, (char *)src, ETH_ALEN);
	eth->h_proto = htons(protocol);
}
